package com.huike.service;

import com.huike.mapper.HospitalMapper;
import com.huike.pojo.Hospital;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class HospitalService {
    @Autowired
    private HospitalMapper hospitalMapper;
    public Hospital getHospitalById(Integer id){ return hospitalMapper.getHospitalById(id);}

    public void updateAdd_many(Integer registerId, Double deposit,Double restCost) {
        hospitalMapper.updateAdd_many(registerId, deposit,restCost);
    }

    public void updateForAdd(String nursePeople, Integer bedNumber, String illness, Integer registerId, String hospitalDate) {
        hospitalMapper.updateForAdd(nursePeople,bedNumber,illness,registerId,hospitalDate);
    }

    public Integer findEndStatusById(Integer registerId) {
       return hospitalMapper.findEndStatusById(registerId);
    }

    public void update(String nursePeople, Integer bedNumber, String illness, Integer registerId) {
        hospitalMapper.update(nursePeople,bedNumber,illness,registerId);
    }

    public void Discharge(Integer registerId, String date) {
        hospitalMapper.Discharge(registerId,date);
    }

    public void Settlement(Integer registerId, Double total, Double restCost) {
        hospitalMapper.Settlement(registerId,total,restCost);
    }
}
